package my.data.x.exception;

public enum  XErrorCode implements ErrorCode {
    RUNTION_ERROR("X-00","运行时内部错误"),
    SYSTEM_TIME_ERROR("S-00","系统时间错误"),
    SYSTEM_ID_ERROR("S-01","分布式id生成报错");
    private final String code;
    private final String describe;

    XErrorCode(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getDescription() {
        return describe;
    }

    @Override
    public String toString() {
        return String.format("Code:[%s], Describe:[%s]", this.code,
                this.describe);
    }
}
